package com.example.business_oa.service;

import com.example.comment_oa.dubbo.BusiDubbo;
import com.example.comment_oa.dubbo.OvDubbo;
import com.example.comment_oa.pojos.attendance.OvertimeAp;
import io.seata.spring.annotation.GlobalTransactional;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

@Service
public class OvService {
    @DubboReference(version = "1.0.0")
    OvDubbo ovDubbo;

    //ap
    @GlobalTransactional(timeoutMills = 300000)
    public int apOv(OvertimeAp overtimeAp, MultipartFile file){return ovDubbo.apOv(overtimeAp,file);}
    //同意加班
    @GlobalTransactional(timeoutMills = 300000)
    public int yesOv(Integer ovId,String yesUser){
        return ovDubbo.yesOv(ovId,yesUser);
    }
    //拒绝加班
    @GlobalTransactional(timeoutMills = 300000)
    public int noOv(Integer ovId,String yesUser){
        return ovDubbo.noOv(ovId,yesUser);
    }
}
